package com.aspose.cells;

abstract class zabn implements zagv {
   private int a;

   public zabn(int var1, int var2, int var3) {
      int var4 = a(var1, 0, 0);

      for(int var5 = 28; var5 > 1; var5 -= 4) {
         var4 = a(var3, var5, var4);
         var4 = a(var2, var5 - 2, var4);
      }

      this.a = var4;
   }

   public zabn(int var1, int[] var2, int[] var3) {
      int var4 = a(var1, 0, 0);
      int var5 = 2;
      int var6 = 64;
      int var7 = 64;

      for(int var8 = 0; var8 < 7; ++var8) {
         if (var8 < var2.length) {
            var6 = var2[var8];
         }

         var4 = a(var6, var5, var4);
         var5 += 2;
         if (var8 < var3.length) {
            var7 = var3[var8];
         }

         var4 = a(var7, var5, var4);
         var5 += 2;
      }

      this.a = var4;
   }

   public int a() {
      return this.c(0);
   }

   public int a(int var1) {
      return this.c((var1 < 7 ? var1 : 6) * 4 + 2);
   }

   public int b(int var1) {
      return this.c((var1 < 7 ? var1 : 6) * 4 + 4);
   }

   private static int a(int var0, int var1, int var2) {
      switch(var0) {
      case 32:
         var2 |= 1 << var1;
         break;
      case 96:
         var2 |= 2 << var1;
      }

      return var2;
   }

   private int c(int var1) {
      switch((this.a & 3 << var1) >> var1) {
      case 0:
         return 64;
      case 2:
         return 96;
      default:
         return 32;
      }
   }
}
